<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>首页</title>
</head>
<script>
var str='您有新消息';
var n=-1;
setInterval(animation, 500);
function animation(){
	n++;
	if(n>str.length-1){
        n=0;
    } 
	document.title=str.slice(n);
}

</script>
<body οnlοad="newtext()">
    <br>预览效果请看标题栏 ↑<br>
</body>
</html>
